import pygame, sys, time

pygame.init()
img = pygame.display.set_mode((512, 512))
pygame.display.set_caption('image')
img.fill((255, 255, 255))
x = y = 256
pygame.draw.circle(img, (220, 20, 60), (x, y), 8)
pygame.display.update()
while True:
    img = pygame.display.set_mode((512, 512))
    img.fill((255, 255, 255))
    pygame.draw.circle(img, (220, 20, 60), (x, y), 16)
    pygame.display.update()
    str1 = pygame.key.get_pressed()
    if str1[pygame.K_RIGHT]:
        x += 10
    elif str1[pygame.K_LEFT]:
        x -= 10
    elif str1[pygame.K_UP]:
        y -= 10
    elif str1[pygame.K_DOWN]:
        y += 10
    elif str1[pygame.K_ESCAPE]:
        break

    time.sleep(0.05)
pygame.quit()
